<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
     .border {
            width: 500px;
            height: 500px;
            margin: 0 auto;
        }

    </style>
</head>
<body>
<div class="border"><table border="1px" cellspacing="0">
    <tr>
        <td>书名</td>
        <td>作者</td>
        <td>出版社</td>
        <td>类型</td>
    </tr>
    {% for book in books %}
    <tr>
        <td>{{book.book_name}}</td>
        <td>{{book.author}}</td>
        <td>{{book.public}}</td>
        <td>{{book.book_type}}</td>
    </tr>
    <br>
    {% endfor %}
</table>
</div>
</body>
</html>